<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>我是毫无用处的按钮</button>
    <button>绑定点击事件</button>
    <button>解除绑定</button>
</body>
<script>
    let btn = document.querySelectorAll('button')
    btn[1].onclick = function () {
        btn[0].innerText = '我可以点击了'
        btn[0].onclick = function () {
            alert('绑定成功')
        }
    }
    btn[2].onclick = function () {
        btn[0].innerText = '我是毫无用处的按钮'
        btn[0].onclick = null
    }
</script>

</html>